<template>
	<!-- <view style="width: 100%;background-color: aliceblue;overflow-y: scroll;">
		<view class="item" v-for="(item,index) in array">
			{{index+1}}
		</view>
	</view> -->
	<view class="intro">
		<view class="sub">
			页面内容
			<view class="item" v-for="(item,index) in array">
				{{index+1}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				array: []
			}
		},

		onPullDownRefresh() {
			uni.stopPullDownRefresh();
			this.array = [];
			this.loadData();
		},

		onReachBottom() {
			console.log("ReachBottom")
			this.loadData();
		},

		onShow() {
			this.loadData();
		},

		methods: {
			loadData() {
				for (let i = 0; i < 20; i++) {
					this.array.push(i);
				}
			}
		}
	}
</script>

<style lang="scss">
	.item {
		margin: 20rpx;
		background: #c9c9c9;
		border-radius: 10rpx;
		height: 100rpx;
	}

	::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
	}

	.intro {
		// width: 100vw;
		// height: 100vh;

		width: 100%;
		height: 100%;

		margin: auto;
		overflow-x: hidden;
	}

	.sub {
		height: 100%;
		// width: calc(100vw + 6px);
		overflow-x: hidden;
	}
</style>